package net.da.services;

import com.google.inject.ImplementedBy;

import net.da.core.bof.ApplicationSession;
import net.da.core.bof.OrganizationUnit;
import net.da.core.bof.OrganizationUser;
import net.da.core.bof.SysUser;
import net.da.core.exception.DaException;
import net.da.services.spi.local.SecurityServiceImpl;

@ImplementedBy(SecurityServiceImpl.class)
public interface SecurityService {

    public ApplicationSession getSessionByAuthorizationCode(String authorisationCode) throws SessionExpiredException;

    public ApplicationSession authenticateGuestUser();

    public ApplicationSession authenticateOrganisationUser(String userName, String password,
            String organisationUnit) throws DaException;

    public ApplicationSession authenticateSysUser(String userName, String password) throws DaException;

    public OrganizationUnit createNewOrganisationUnit(ApplicationSession session);

    public OrganizationUser createNewOrganisationUser(ApplicationSession session, OrganizationUnit organizationUnit);

    public SysUser createNewAdminUser();

    public OrganizationUnit getOrganisationUnit(Integer id);

}
